<?php
function tour_link($name_link = '', $ext = '.html')
{
	return site_url($name_link).$ext;
}

function tour_style_link($name_link = '',$pre_fix = 'tours')
{
	return site_url($pre_fix.'/'.$name_link).'/';
}

function news_link($title_link = '', $pre = 'news', $ext = '.html')
{
	return site_url($pre.'/'.$title_link).$ext;
}

function gallery_link($title_link = '', $pre = 'photo-gallery', $ext = '/')
{
	return site_url($pre.'/'.$title_link).$ext;
}

function faq_link($name_link = '', $ext = '.html', $prefix='faq')
{
	return site_url($prefix.'/'.$name_link).$ext;
}

function destination_link($name_link = '', $ext = '/', $prefix = 'destination')
{
	return site_url($prefix.'/'.$name_link).$ext;
}

function hightlight_link($name_link = '', $prefix = 'hightlight', $ext = '/')
{
	return site_url($prefix.'/'.$name_link).$ext;
}

function travelguide_link($name_link = '', $prefix = 'travelguide', $ext = '/')
{
	return site_url($prefix.'/'.$name_link).$ext;
}

function filter_link($str,$qs='(min|max|p|duration|price)')
{
	$str	=	preg_replace('@'.$qs.'=[\w[:punct:]]+@is', '', $str);
	$str	=	str_replace(array('&&','?&'), array('&','?'), $str);
	$str	=	preg_replace('@(&|\?)$@is', '', $str);
	return	$str;

}